<template>
  <v-navigation-drawer app>
    <v-list-item>
      <v-list-item-content>
        <v-list-item-title class="text-h6"> 测试平台 </v-list-item-title>
        <v-list-item-subtitle> 汤达人 </v-list-item-subtitle>
      </v-list-item-content>
    </v-list-item>

    <v-divider></v-divider>

    <v-list dense nav>
      <v-list-item v-for="item in items" :key="item.title" link @click="switchTab(item)">
        <v-list-item-icon>
          <v-icon>{{ item.icon }}</v-icon>
        </v-list-item-icon>

        <v-list-item-content>
          <v-list-item-title>{{ item.title }}</v-list-item-title>
        </v-list-item-content>
      </v-list-item>
    </v-list>
  </v-navigation-drawer>
</template>
<script>
export default {
  data() {
    return {
      items: [
        { title: "测试用例", icon: "mdi-view-dashboard", router: "testcase" },
        { title: "测试任务", icon: "mdi-image", router: "task" },
        { title: "测试报告", icon: "mdi-help-box", router: "task" },
      ],
      right: null,
    };
  },
  methods: {
      switchTab(item){
          console.log("切换界面" + item.router)
          this.$router.push({name: item.router})
      }
  }
};
</script>